Ext.Loader.setConfig({enabled: true});
Ext.Loader.setPath('Ext.ux.DataView', '../ux/DataView/');
Ext.require([
    'Ext.data.*',
    'Ext.util.*',
    'Ext.view.View',
    'Ext.XTemplate',
    'Ext.panel.Panel',
    'Ext.toolbar.*',
    'Ext.slider.Multi'
]);
Ext.define('Mobile', {
        extend: 'Ext.data.Model',
        fields: [
             {name: 'perfession', type: 'string'},
             {name: 'name', type: 'string'},
             {name: 'url', type: 'string'},
             {name: 'department', type: 'string'}
            
        ]
    });
var store =  Ext.create('Ext.data.Store', {
     model: 'Mobile', 
     autoLoad:true,
     proxy: {
         type: 'ajax',
         url: 'employees_personEmp',
         reader: {
             type: 'json',
             root: 'datas'
         }
     }
})
Ext.define('AM.view.PersonDetailView', {
	   extend: 'Ext.Panel',
//	   frame:true,
	   alias : 'widget.personDetailView',
	   layout: {
	        type: 'table',
	        columns: 3,
	        rows:3
	    },
	    items: [{
	         border : false,
	         rowspan: 3,
	         colspan: 1,
	         padding: 5,
	         items: Ext.create('Ext.view.View', {
		        deferInitialRefresh: false,
		        store: store,
				tpl: Ext.create('Ext.XTemplate',
				       '<tpl for=".">',
				           '<div class="thumb-wrap">',   	  
						          '<div class="thumb">',
						               '<img width="100" height="150"  src="{url}" />',
						               '<br/><span> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<strong>个人头像</strong></span>',
						           '</div>',
					          ' <div/>',
				                
				          '</tpl>'
				        )
			 })	
	    },{
	    	border : false,
	   	    rowspan: 1,
	   	    padding: 5,
	        colspan: 1
	    },{
	   	    border : false,
	   	    rowspan: 1,
	        colspan: 1,
	        items: Ext.create('Ext.view.View', {
		        deferInitialRefresh: false,
		        store: store,
				tpl: Ext.create('Ext.XTemplate',
				       '<tpl for=".">',
				           '<div class="thumb-wrap">',   	  
					               '<div>',	 
						                 '姓名：<strong>{name}</strong>'+'<br>',
						                 '<br>',
						                 '科室：<strong>{department}</strong>'+'<br>',
						                 '<br>',
						                 '职称：<strong>{perfession}</strong>',
						            '</div>',
					          ' <div/>', 
				          '</tpl>'
				        )
			 })	
	    }]
  })
